package com.thti.mecool.client.command.send.plan;

import com.thti.mecool.client.protocol.plan.PlanProtocol;
import com.thti.mecool.client.protocol.plan.TaskProtocol;
import com.thti.mecool.client.protocol.system.ProjectProtocol;
import com.thti.mecool.client.service.Protocol;
import com.thti.mecool.client.service.ThtiService;


public class PlanSend {
	
	public static void getPlan(String userLoginName,String date){
		PlanProtocol planProtocol=new PlanProtocol();
		planProtocol.setDate(date); 
		planProtocol.setUserLoginName(userLoginName);
		ThtiService.sendProtocol(Protocol.getPlan, planProtocol);
	}
	
	public static void getPlanProject(String userLoginName){
		ProjectProtocol projectProtocol=new ProjectProtocol();
		projectProtocol.setUserLoginName(userLoginName);
		ThtiService.sendProtocol(Protocol.getPlanProject, projectProtocol);
	}
	
	public static void getTask(String loginName){
		TaskProtocol taskProtocol=new TaskProtocol();
		taskProtocol.setUserLoginName(loginName);
		ThtiService.sendProtocol(Protocol.getTask, taskProtocol);
	}
	
	public static void addPlan(String jsonString){
		ThtiService.sendProtocol(Protocol.getAddPlan, jsonString);
	}
	/**
	 * 获取我的计划
	 * @param userLoginName
	 * @param date
	 */
	public static void getMyPlan(String userLoginName,String date){
		PlanProtocol planProtocol=new PlanProtocol();
		planProtocol.setDate(date); 
		planProtocol.setUserLoginName(userLoginName);
		ThtiService.sendProtocol(Protocol.getMyPlan, planProtocol);
	}
}
